package com.smart.model.dtomapper;

import com.smart.model.domain.UnitDO;
import com.smart.model.request.UnitRequest;
import com.smart.model.vo.UnitVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface UnitDtoMapper {

    UnitDtoMapper INSTANCE = Mappers.getMapper(UnitDtoMapper.class);

    /**
    * DO to VO
    * @param unitDO
    * @return
    */
    UnitVO do2VO(UnitDO unitDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    UnitDO request2DO(UnitRequest request);
}
